package com.woniuxy.sddfp.sms.config;

import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableConfigurationProperties(SmsProperties.class)
public class SmsAutoConfiguration {

    /**
     * 创建自定义template组件对象，加入容器
     */
    @Bean
    public SmsTemplate smsTemplate (SmsProperties smsProperties){
        return new SmsTemplate(smsProperties);
    }
}